package ru.pashkan.spring.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import ru.pashkan.spring.db.service.UserService;


//Оставить для ExtJS
@Controller
@RequestMapping("/users")
public class UserController {

    @Autowired
    private UserService userService;

//    @RequestMapping(method = RequestMethod.GET)
//    @ResponseBody
//    public Collection<User> getCars(String search) {
//        return userService.getUsers(search);
//    }
//    @RequestMapping(method = RequestMethod.POST)
//    @ResponseBody
//    public ExtResult setCar(@RequestBody Car car) {
//        return new ExtResult(carService.add(car), car);
//    }
//    @RequestMapping(value = "{id}", method = RequestMethod.DELETE)
//    @ResponseBody
//    public String deleteCar(@RequestBody Car car) {
//        carService.delete(car);
//        return "delete";
//    }
//    @RequestMapping(value = "{id}", method = RequestMethod.PUT)
//    @ResponseBody
//    public String updateCar(@RequestBody Car car) {
//        carService.update(car);
//        return "update";
//    }
}
